# Forked from Alpine for systemd support

pkgname=gnome-settings-daemon
pkgver=99947.2
_pkgver=47.2
pkgrel=1
pkgdesc="GNOME settings daemon"
url="https://gitlab.gnome.org/GNOME/gnome-settings-daemon"
arch="all"
options="!check" # tests fail on builders
license="GPL-2.0-only AND LGPL-2.1-only"
depends="pulseaudio"
depends_dev="
	alsa-lib-dev
	colord-dev
	cups-dev
	geoclue-dev
	geocode-glib-dev>=3.26.4-r1
	lcms2-dev
	libcanberra-dev
	libgweather4-dev
	libnotify-dev
	libwacom-dev
	modemmanager-dev
	networkmanager-dev
	nss-dev
	pango-dev
	polkit-dev
	pulseaudio-dev
	upower-dev
	"
makedepends="
	$depends_dev
	coreutils
	gcr4-dev
	glib-dev
	gnome-desktop-dev
	gsettings-desktop-schemas-dev
	gtk+3.0-dev
	libxml2-utils
	meson
	"
# checkdepends="
# 	gnome-session
# 	gnome-shell
# 	py3-dbusmock
# 	py3-gobject3
# 	umockdev-dev
# 	"
subpackages="
	$pkgname-dev
	$pkgname-lang
	$pkgname-systemd
	"
source="https://download.gnome.org/sources/gnome-settings-daemon/${_pkgver%.*}/gnome-settings-daemon-$_pkgver.tar.xz
	"
builddir="$srcdir/gnome-settings-daemon-$_pkgver"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dsystemd=true \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
fd3e358aa1f6a317dc49436965135dde204bd55fee9c96127d1208aafb60af3667fcc344a1667be1596892987f67ebab3fc7eefaeeefce82e1c65635e36c126f  gnome-settings-daemon-47.2.tar.xz
"
